package com.pty.demo.behaviour.state;

/**
 * @author pengty
 * @date 2020/3/13
 */
public class DeliveredState extends OrderState {

    public DeliveredState(OrderStateContext orderStateContext) {
        super(orderStateContext);
    }

    @Override
    void pay() {
        System.out.println("该订单已完成支付");
    }

    @Override
    void checkPay() {
        System.out.println("该订单已完成支付");
    }

    @Override
    void deliver() {

    }

    @Override
    void receive() {
        System.out.println("买家收货");
        orderStateContext.setCurrentState(new PaidState(orderStateContext));
    }
}
